//
// Created by 吴锐 on 2022/2/25.
//

#include "iostream"

using namespace std;

class Perosn {
public:
    int age;

    Perosn(int age){
        this->age = age;
    }

    Perosn& addPersonAge(Perosn& p){
        this->age += p.age;
        return *this;
    }
};

void test01(){
    Perosn p1(18);
    cout << p1.age << endl;

    Perosn p2(10);
    p2.addPersonAge(p1).addPersonAge(p1).addPersonAge(p1);
    cout << p2.age << endl;
}

int main(){
    test01();
    return 0;
}